from typing import Union

from vec_database._vector_type import SupportedVSType
from vec_database.base import VDBService
from vec_database.config import EMBEDDING_MODEL


class VDBServiceFactory:
    @staticmethod
    def get_service(kb_name: str,
                    vector_store_type: Union[str, SupportedVSType],
                    embed_model: str = EMBEDDING_MODEL,
                    ) -> VDBService:
        if isinstance(vector_store_type, str):
            vector_store_type = getattr(SupportedVSType, vector_store_type.upper())
